package com.wngbms;

import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;

public class Example {

    public static void main(String[] args) throws InterruptedException {

        WebDriver driver = new ChromeDriver();

        driver.navigate().to("https://www.baidu.com");
        WebElement search_input = driver.findElement(By.name("wd"));
        search_input.sendKeys("极客时间");
        search_input.submit();

        Thread.sleep(3000);

        Assert.assertEquals("极客时间_百度搜索", driver.getTitle());

        driver.quit();
    }

}
